// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_img.p_video;

import android.graphics.Bitmap;
import android.graphics.Matrix;

public class cls_aj
{

    public cls_aj(Bitmap bitmap)
    {
        b = bitmap;
        c = 0;
    }

    public cls_aj(Bitmap bitmap, int i)
    {
        b = bitmap;
        c = i % 360;
    }

    public int a()
    {
        return c;
    }

    public void a(int i)
    {
        c = i;
    }

    public void a(Bitmap bitmap)
    {
        b = bitmap;
    }

    public Bitmap b()
    {
        return b;
    }

    public Matrix c()
    {
        Matrix matrix = new Matrix();
        if(c != 0)
        {
            int i = b.getWidth() / 2;
            int j = b.getHeight() / 2;
            matrix.preTranslate(-i, -j);
            matrix.postRotate(c);
            matrix.postTranslate(f() / 2, e() / 2);
        }
        return matrix;
    }

    public boolean d()
    {
        boolean flag;
        if((c / 90) % 2 != 0)
            flag = true;
        else
            flag = false;
        return flag;
    }

    public int e()
    {
        int i;
        if(d())
            i = b.getWidth();
        else
            i = b.getHeight();
        return i;
    }

    public int f()
    {
        int i;
        if(d())
            i = b.getHeight();
        else
            i = b.getWidth();
        return i;
    }

    public void g()
    {
        if(b != null)
        {
            b.recycle();
            b = null;
        }
    }

    public static final String a = "RotateBitmap";
    private Bitmap b;
    private int c;
}
